<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="../images/favicon.ico">
<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>


<title></title>
</head>

<div class="ibox-content">
	<form class="form-horizontal" id="dataform" onsubmit="javascripr:return false;">

	 	<input type="hidden" name="id" value="${param.id}"> 

		<%--<c:if test="${obj ne null }">
			<input type="hidden" name="id" value="${obj.id }">
		</c:if> --%>
		<div class="form-group">
			<label class="col-sm-2 control-label">项目名称：</label>
			<div class="col-sm-4">
				<input type="text" dataType="*1-50" class="form-control"
					value="${project.projName}" name="projName" nullmsg="项目名称不能为空">
				<div class="Validform_checktip"></div>
			</div>
			<label class="col-sm-2 control-label">客户id：</label>
			<div class="col-sm-4">
				<input type="hidden" id="custId" value="${project.custId}">
				
				<input type="text" dataType="*1-510" class="form-control"
					value="${project.custId}" name="custId" nullmsg="客户id不能为空">
				<div class="Validform_checktip"></div> 
			</div>
		</div>
		
		<%-- <div class="form-group">
			<label class="col-sm-2 control-label">立项时间：</label>
			<div class="col-sm-4">
				<input size="16" type="text" id="createTime" name="createTime" value="<fmt:formatDate value='${project.createTime}' type='date'  pattern="yyyy-dd-MM hh:mm:ss"/>" readonly class="form_datetime form-control">
				<script type="text/javascript">
				    $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii'});
				</script>       
				<div class="Validform_checktip"></div>
			</div>
			<label class="col-sm-2 control-label">开始时间</label>
			<div class="col-sm-4">
				<input size="16" type="text" id="beginTime" name="beginTime" value="<fmt:formatDate value='${project.beginTime}' type='date'  pattern="yyyy-dd-MM hh:mm:ss"/>" readonly class="form_datetime form-control">
				<script type="text/javascript">
				    $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii'});
				</script>     
				<div class="Validform_checktip"></div>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">预期完成时间</label>
			<div class="col-sm-4">
				<input size="16" type="text" id="endTime" name="endTime" value="<fmt:formatDate value='${project.endTime}' type='date'  pattern="yyyy-dd-MM hh:mm:ss"/>" readonly class="form_datetime form-control">
				<script type="text/javascript">
				    $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii'});
				</script>  
				<div class="Validform_checktip"></div>
			</div>
			<label class="col-sm-2 control-label  ">实际完成时间：</label>
			<div class="  col-sm-4">
				<input size="16" type="text" id="actEndTime" name="actEndTime"  value="<fmt:formatDate value='${project.actEndTime}' type='date'  pattern="yyyy-dd-MM hh:mm:ss"/>" readonly class="form_datetime form-control">
				<script type="text/javascript">
				    $(".form_datetime").datetimepicker({format: 'yyyy-mm-dd hh:ii'});
				</script> 
			</div>
		</div> --%>
		
		
		<div class="form-group">
			<label class="col-sm-2 control-label">创建人id</label>
			<div class="col-sm-4">
				<input type="text" dataType="*1-510" class="form-control"
					value="${project.userId}" name="userId" nullmsg="创建人不能为空">
				<div class="Validform_checktip"></div>
			</div>
			<label class="col-sm-2 control-label">项目状态</label>
			<div class="col-sm-4">
				<select name="status">
					<c:if test="${project.status eq '项目立项'}"></c:if>
					<option value="项目立项" <c:if test="${project.status eq '项目立项'}">selected="selected"</c:if> >&nbsp;&nbsp;&nbsp; 项目立项&nbsp;&nbsp;&nbsp;</option>
					<option value="研发中" <c:if test="${project.status eq '研发中'}">selected="selected"</c:if>>&nbsp;&nbsp;&nbsp;研发中 &nbsp;&nbsp;&nbsp;</option>
					<option value="项目结束" <c:if test="${project.status eq '项目结束'}">selected="selected"</c:if>>&nbsp;&nbsp;&nbsp;项目结束 &nbsp;&nbsp;&nbsp;</option>
				</select>
				<%-- <input type="text" dataType="*1-510" class="form-control"
					value="${project.status}" name="status" nullmsg="项目状态">
				<div class="Validform_checktip"></div> --%>
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label">访问地址</label>
			<div class="col-sm-4">
				<input type="text" dataType="*1-510" class="form-control"
					value="${project.url}" name="url" nullmsg="访问地址不能为空">
				<div class="Validform_checktip"></div>
			</div>
			<label class="col-sm-2 control-label">git地址</label>
			<div class="col-sm-4">
				<input type="text" dataType="*1-510" class="form-control"
					value="${project.gitUrl}" name="gitUrl" nullmsg="git地址不能为空">
				<div class="Validform_checktip"></div>
			</div>
		</div>
		
		



		<div class="form-group ">
			<div class="col-sm-12 text-center">
				<a href="javascript:void(0);" onclick="myForm.submit()"
					class="btn btn-success radius">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<button onclick="MTools.closeForm()" class="btn btn-danger radius"
					type="button">取消</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
	var myForm = MForm.initForm({
		invokeUrl : "${path}/admin/projectInfo/updateProj",
		isvalid : true,
		afterSubmit : function() {
			//parent.myGrid.serchData();
		},
	});
	
	//加载客户信息
	/* $(function(){
		$.AjaxProxy({a : false,c : false}).invoke("${path}/admin/projectInfo/queryPostName",function(loj){
			var html="";
			for(var i = 0; i < loj.getRowCount(); i++){
				if($("#custId").val() == loj.getString(i,"id")){
					html=html+"<option value='"+loj.getString(i,"id")+"' selected='selected">"+loj.getString(i,"name")+"</option>"
				}else{
					html=html+"<option value='"+loj.getString(i,"id")+"'>"+loj.getString(i,"name")+"</option>"
				}
			}
		})
	}) */

</script>
</body>
</html>